<!DOCTYPE html>
<html lang="cn" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>互联网村镇管理平台</title>
    <link rel="stylesheet" type="text/css" th:href="@{/css/common.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/css/main.css}" />
    <link rel="stylesheet" th:href="@{/js/libs/zTree/v3/css/metroStyle/metroStyle.css}" type="text/css">
</head>
<body>
    <div class="container clearfix">
        <div class="main-wrap">
            <div class="crumb-wrap">
                <div class="crumb-list">
                    <i class="icon-font">&#xe973;</i>
                    <a href="javascript:void(0);">角色管理</a>
                    <span class="crumb-step">&gt;</span>
                    <span class="crumb-name">添加角色</span>
                </div>
            </div>
            <div class="result-wrap">
                <div class="result-content">
                    <form id="roleAddForm" onsubmit="return executeRoleAdd();">
                        <table class="insert-tab" width="100%">
                            <tbody>
                            <tr>
                                <th>
                                    <i class="require-red">*</i>角色名称：
                                </th>
                                <td>
                                    <input class="common-text required" id="roleName" name="roleName" size="50" maxlength="50" type="text" />
                                </td>
                            </tr>
                            <tr>
                                <th>
                                    <i class="require-red">*</i>角色描述：
                                </th>
                                <td>
                                    <input class="common-text required" id="roleDesc" name="roleDesc" size="50" maxlength="50" type="text" />
                                </td>
                            </tr>
                            <tr>
                                <th>
                                    <i class="require-red">*</i> 菜单权限：
                                </th>
                                <td>
                                    <!-- 菜单树-->
									<ul id="menuTree" class="ztree" ></ul>
									<input type="hidden" name="menuIds" id='menuIds'/>
                                </td>
                            </tr>
                            <tr>
                                <th></th>
                                <td>
                                    <input class="btn btn-primary btn6 mr10" value="提交" type="submit" />
                                    <input class="btn btn6" onclick="history.go(-1)" value="返回" type="button" />
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <div th:include="admin/common/common"></div>
    <script type="text/javascript" th:src="@{/js/web/role/role.js?v=1.0}"></script>
    <script type="text/javascript" th:src="@{/js/libs/zTree/v3/js/jquery.ztree.all-3.5.min.js}"></script> 
    <script th:inline="javascript">
    	var treeSetting = {
    	    view: {selectedMulti: false},
    	    check: {enable: true},
    	    data: {simpleData: {enable: true}}
    	};
    	var treeData = [[${menuTreeData}]];
    	if(treeData != null && $.trim(treeData) != '') {
    		zNodes = eval(treeData);
    		$.fn.zTree.init($("#menuTree"), treeSetting, zNodes);
    	}
    </script>
</body>
</html>